#define ENGINE_API __declspec(dllexport)
#include "Game.h"

Game::Game(HINSTANCE hInstance):m_pkWindow(NULL),m_hinstance(hInstance){

}

bool Game::StartUp(){
	HWND hWnd = NULL;
	m_pkWindow = new Window(m_hinstance);
	if(m_pkWindow == NULL)
		return false;
	m_pkWindow->CreateWindowE(600,800, hWnd);
	renderer = new Renderer(hWnd);
	if(!renderer)
		return false;
	if(!renderer->InitDX(hWnd))
		return false;
	if(!OnStartUp())
		return false;
	return true;
}
bool Game::Loop(){
	renderer->StartFrame();
	if(!OnLoop())
		return false;
	renderer->EndFrame();
	return true;
}
bool Game::ShutDown(){
	if(!OnShutDown())
		return false;
	return true;
}